/** @file               sw_sqlite.h
 *  @copyright          Copyright (C) 2006-2026 flyfish (tenggui_fu@126.com)
 *  @brief              This file is part of the swallow library
 *  @author             $Author: flyfish $
 *  @version            $Rev: 385 $
 *  @date               $Date: 2016-12-22 00:12:05 +0800 (周四, 22 12月 2016) $
 */
#ifndef __SW_SQLITE_H__
#define __SW_SQLITE_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef SW_VOID *SW_SQLITE;
#define SW_INVALID_SQLITE NULL

typedef SW_RET (*SW_SQLITE_EXEC_CALLBACK)(SW_VOID *, SW_INT32, SW_CHAR **, SW_CHAR **);

SW_API SW_RET SW_InitSqliteAPI(SW_VOID);
SW_API SW_RET SW_RunSqliteAPI(SW_VOID);
SW_API SW_RET SW_StopSqliteAPI(SW_VOID);
SW_API SW_RET SW_ExitSqliteAPI(SW_VOID);
SW_API SW_SQLITE SW_OpenSqlite(const SW_CHAR *pFileName);
SW_API SW_RET SW_CloseSqlite(SW_SQLITE db);
SW_API SW_RET SW_SqliteExec(SW_SQLITE db, const SW_CHAR *pSql, SW_SQLITE_EXEC_CALLBACK callback, SW_VOID *arg);

#ifdef __cplusplus
}
#endif

#endif

